#include <iostream>
#include<set>
using namespace std;
template <class T>
T add(T t1,T t2){
    return t1 + t2;
}
template <class T>
set<T> add(set<T> & a,set<T> & b){
    set<T> result = a;
    result.insert(b.begin(),b.end());
    return result;
}
void test(){
   int a = 10, b = 20;
   double x = 2.3, y=4.2;
   set<int> s1= {1,5,6};
   set<int> s2 = {3,5,8};
   cout<<"整数相加："<<add(a,b)<<endl;
   cout<<"double："<<add(x,y)<<endl;
   set<int> result = add(s1,s2);
   for(auto s: result){
       cout<< s << " ";
   }
}
int main()
{
    test();
    return 0;
}

